package com.yanqu.road.server.timer.player;

import com.yanqu.road.server.manger.player.DestroyRoleMgr;
import com.yanqu.road.utils.executor.GeneralTask;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * 注销检测任务
 *
 */
public class DestroyRoleCheckTask extends GeneralTask {

	private static Logger logger = LogManager.getLogger(DestroyRoleCheckTask.class.getName());
	private boolean isRun = false;

	@Override
	public void doRun() {
		if(!isRun){
			isRun = true;
			try {
				DestroyRoleMgr.timerTask();
			}catch (Exception e){
				logger.error("DestroyRoleMgr timerTask error:", e);
			}finally {
				isRun = false;
			}
		}
	}
}
